/*
 * Amazon Ads API - Sponsored Products
 * Use the Amazon Ads API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see the [Sponsored Products Support Center](https://advertising.amazon.com/help?entityId=ENTITY3CWETCZD9HEG2#GWGFKPEWVWG2CLUJ). For onboarding information, see the [account setup](setting-up/account-setup) topic.<br/><br/> 
 *
 * The version of the OpenAPI document: 2.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
 * BiddingAdjustments
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-04-12T19:05:39.971406+08:00[Asia/Shanghai]")
public class BiddingAdjustments {
  /**
   * You can enable controls to adjust your bid based on the placement location. Specify a location where you want to use bid controls. The percentage value set is the percentage of the original bid for which you want to have your bid adjustment increased. For example, a 50% adjustment on a $1.00 bid would increase the bid to $1.50 for the opportunity to win a specified placement. | Predicate |  Placement | |-----------|------------| | &#x60;placementTop&#x60; | Top of search (first page) | | &#x60;placementProductPage&#x60; | Product pages |
   */
  @JsonAdapter(PredicateEnum.Adapter.class)
  public enum PredicateEnum {
    PLACEMENTTOP("placementTop"),
    
    PLACEMENTPRODUCTPAGE("placementProductPage");

    private String value;

    PredicateEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static PredicateEnum fromValue(String value) {
      for (PredicateEnum b : PredicateEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    public static class Adapter extends TypeAdapter<PredicateEnum> {
      @Override
      public void write(final JsonWriter jsonWriter, final PredicateEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public PredicateEnum read(final JsonReader jsonReader) throws IOException {
        String value =  jsonReader.nextString();
        return PredicateEnum.fromValue(value);
      }
    }
  }

  public static final String SERIALIZED_NAME_PREDICATE = "predicate";
  @SerializedName(SERIALIZED_NAME_PREDICATE)
  private PredicateEnum predicate;

  public static final String SERIALIZED_NAME_PERCENTAGE = "percentage";
  @SerializedName(SERIALIZED_NAME_PERCENTAGE)
  private Float percentage;


  public BiddingAdjustments predicate(PredicateEnum predicate) {
    
    this.predicate = predicate;
    return this;
  }

   /**
   * You can enable controls to adjust your bid based on the placement location. Specify a location where you want to use bid controls. The percentage value set is the percentage of the original bid for which you want to have your bid adjustment increased. For example, a 50% adjustment on a $1.00 bid would increase the bid to $1.50 for the opportunity to win a specified placement. | Predicate |  Placement | |-----------|------------| | &#x60;placementTop&#x60; | Top of search (first page) | | &#x60;placementProductPage&#x60; | Product pages |
   * @return predicate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "You can enable controls to adjust your bid based on the placement location. Specify a location where you want to use bid controls. The percentage value set is the percentage of the original bid for which you want to have your bid adjustment increased. For example, a 50% adjustment on a $1.00 bid would increase the bid to $1.50 for the opportunity to win a specified placement. | Predicate |  Placement | |-----------|------------| | `placementTop` | Top of search (first page) | | `placementProductPage` | Product pages |")

  public PredicateEnum getPredicate() {
    return predicate;
  }


  public void setPredicate(PredicateEnum predicate) {
    this.predicate = predicate;
  }


  public BiddingAdjustments percentage(Float percentage) {
    
    this.percentage = percentage;
    return this;
  }

   /**
   * The bid adjustment percentage value.
   * @return percentage
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The bid adjustment percentage value.")

  public Float getPercentage() {
    return percentage;
  }


  public void setPercentage(Float percentage) {
    this.percentage = percentage;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BiddingAdjustments biddingAdjustments = (BiddingAdjustments) o;
    return Objects.equals(this.predicate, biddingAdjustments.predicate) &&
        Objects.equals(this.percentage, biddingAdjustments.percentage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(predicate, percentage);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BiddingAdjustments {\n");
    sb.append("    predicate: ").append(toIndentedString(predicate)).append("\n");
    sb.append("    percentage: ").append(toIndentedString(percentage)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

